package com.javaspirit.android.diary.dal;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.javaspirit.android.diary.util.DiaryConstant;

/**
 * DB Helper
 * Mainly used for creating the initial database structure and handle any structure upgrades.
 * 
 * @author CONVHD
 *
 */
public class DbHelper extends SQLiteOpenHelper{
	
	public DbHelper(Context context) {
		super(context, DiaryConstant.DB_NAME, null, DiaryConstant.DB_VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		NoteTable.onCreate(db);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		NoteTable.onUpgrade(db, oldVersion, newVersion);
	}

}
